| ArrayIsEmpty |
|
 |
| Description
|
|
Determines whether an array is empty of data elements.
|
| |
| Returns
|
|
True, if the array is empty; otherwise, False.
|
| |
| Category
|
|
Array functions
|
| |
| Function syntax |
ArrayIsEmpty(array)
|
| |
| See also
|
|
ArrayLen
|
| |
| History
|
|
ColdFusion MX: Changed behavior: this function can be used on XML objects.
|
| |
| Parameters
|
| |
| Parameter |
Description |
| array |
Name of an array |
|
| |
Example<h3>ArrayIsEmpty Example</h3>
<!--- create a new array --->
<cfset MyArray = ArrayNew(1)>
<!--- populate an element or two --->
<cfset MyArray[1] = "Test">
<cfset MyArray[2] = "Other Test">
<!--- output the contents of the array --->
<p>Your array contents are:
<cfoutput>#ArrayToList(MyArray)#</cfoutput>
<!--- check if the array is empty --->
<p>Is the array empty?:
<cfoutput>#ArrayIsEmpty(MyArray)#</cfoutput>
<p>Now, clear the array:
<!--- now clear the array --->
<cfset Temp = ArrayClear(MyArray)>
<!--- check if the array is empty --->
<p>Is the array empty?:
<cfoutput>#ArrayIsEmpty(MyArray)#</cfoutput>
|